<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="./lib/axios.min.js"></script>
</head>
<body>
    <button>发送请求</button>
</body>
<script>
    const btn = document.querySelector("button");
	btn.onclick = function(){
		axios.get("http://zhangpeiyue.com/scoreList",{
			timeout:3000
        }).then(value=>{
			console.log(value.data);
        }).catch(err=>{
			if(err.code === "ECONNABORTED"){
			    alert("请求超时，请稍后再试！")
            }
        })
    }

</script>
</html>